﻿// 客户端代码
using ExpressHelps;

class Program
{
    static void Main()
    {
        // 创建任务管理系统
        TaskManager taskManager = new TaskManager();

        // 创建任务接收者
        TaskReceiver receiver1 = new TaskReceiver("Receiver 1");
        TaskReceiver receiver2 = new TaskReceiver("Receiver 2");

        // 注册观察者
        taskManager.AddObserver(receiver1);
        taskManager.AddObserver(receiver2);

        // 下单者发布任务
        taskManager.PublishTask("Buy groceries");

        // 任务接收者会收到通知

        Console.ReadLine();
    }
}